"""
https://www.lanqiao.cn/problems/607/learning/?page=1&first_category_id=1&tag_category_id=50
"""
"""
需要从矩阵上切割正方形，比如5X3的可以切割成 3X3 2X2 1X1 1X1 四个正方形
现在是一个 2019X324 的矩形可以切割多少个"""



a = 2019
b = 324
cont = 1
while a != b:
    a = a - b
    if a <b:
        a,b=b,a
    cont +=1
    print(a,b)

print(cont)
